<%-- 
    Document   : modifyCompanyInfo
    Created on : 2011-5-21, 21:24:46
    Author     : tecton
--%>

<%@page import="com.dairy.structures.Company"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%
    Company c = (Company)request.getAttribute("companyInfo");
    Object success = request.getAttribute("success");
    Boolean suc = null;
%>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript">
        function submitForm(){
            companyInfoModifyForm.submit();
        }
    </script>
    <title>订奶系统</title>
    <link rel="stylesheet" type="text/css" href="./home_style.css"/>

</head>

<body>
    <div class="wrapper">
        <div class="header">
            <h1>Company Information</h1>
        </div>

        <div class="content">

            <div class="primary">
                <% if (success != null)
                    {
                    suc = (Boolean)success;
                    if (suc){
                %>
                <h1>modification succeeded</h1>
                <%
                    }else{
                %>
                <h1>modification failed</h1>
                <%
                }}
                %>
                <html:form action="/modifyCompanyInfo" method="POST">
                    <br/>
                    <table>
                        <tr>
                            <td style="width:150px">
                                <label>company ID:</label>
                            </td>
                            <td>
                                <%=c.id_company%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>company:</label>
                            </td>
                            <td>
                                <%=c.name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>telephone:</label>
                            </td>
                            <td>
                                <input type="text" name="tel" value="<%=c.tel%>">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>address:</label>
                            </td>
                            <td>
                                <input type="text" name="address" value="<%=c.address%>">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <button type="submit" name="modify onclick="javascript:submitForm()">Modify</button>
                            </td>
                        </tr>
                    </table>
<!--                    <label>company ID:</label><br/>
                    <p><%=c.id_company%></p>
                    <label>company:</label><br/>
                    <p><%=c.name%></p>
                    <label>telephone:</label><br/>
                    <input type="text" name="tel" id="tel"
                           value="<%=c.tel%>" /><br />
                    <label>address:</label><br/>
                    <input type="text" name="address" id="address"
                           value="<%=c.address%>" /><br/>
                    <button type="submit" name="modify"
                            onclick="javascript:submitForm()">Modify</button>-->
                </html:form>
            </div>

            <div class="secondary">
                <ul class="nav">
                    <li class="first"><a href="admin/index.do">Home</a></li>
                    <li><a href="./logout.do">logout</a></li>
                    <li><a href="./dispatchOrders.do">Dispatch Orders</a></li>
                    <li><a href="./modifyCompany.do">company information</a></li>
                    <li><a href="./viewProduct.do">view products</a></li>
                    <li><a href="./viewProduct.do">modify products</a></li>
                </ul>

            </div>

        </div>

        <div class="footer">
            <p>Dairy Product Ordering System - All Rights Reserved</p>
        </div>
    </div>
</body>
</html>